#include "../apue.h"
#include <time.h>

#define FTIME_MAX 80

int main(void)
{
    time_t t;
    struct tm * tmp;
    char tbuf[FTIME_MAX];

    time(&t);
    tmp = localtime(&t);
    if (strftime(tbuf, FTIME_MAX, "%Y %m %d %a %R:%S %Z", tmp) == 0)
        err_sys("strftime failed");
    else
        printf("%s\n", tbuf);

    return 0;
}
